<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        window.onload = function () {
            fetch("sayHi").then(function (response) {
                return response.text().then(function (text) {
                    //myArticle.innerHTML = text;
                    document.getElementById("d").innerHTML = text;
                });
            });

            // fetch("sayHi").then(function(response){
            //
            //     document.getElementById("d").innerHTML=JSON.stringify(response.body.text());//.text();
            // });
        }
    </script>
</head>
<body>
<hr/>
<h1>你好</h1>
<div id="d"></div>
</body>
</html>